package com.huixh.train.business.service;

import com.huixh.train.business.domain.DailyTrainTicket;
import com.huixh.train.business.domain.Train;
import com.huixh.train.business.req.DailyTrainTicketQueryReq;
import com.huixh.train.business.req.DailyTrainTicketSaveReq;
import com.huixh.train.business.resp.DailyTrainTicketQueryResp;
import com.huixh.train.common.resp.PageResult;

import java.util.Date;
import java.util.List;

/**
* @author huixh
*/
public interface DailyTrainTicketService {
    /**
    * 保存
    * @param  dailyTrainTicketSaveReq 保存参数
    */
    void save(DailyTrainTicketSaveReq dailyTrainTicketSaveReq);

    /**
    * 查询列表
    * @param dailyTrainTicketQueryReq 查询参数
    * @return list
    */
    PageResult <List<DailyTrainTicketQueryResp>> queryList(DailyTrainTicketQueryReq dailyTrainTicketQueryReq);
    /**
    * 删除
    * @param id id
    */
    void delete(Long id);

    /**
     * 生成余票信息
     *
     * @param trainCode
     * @param date
     * @param train
     */
    void genDailyTrainTicket(Date date, Train train);

    /**
     * 根据唯一标识查询
     * @param date 日期
     * @param trainCode 车次
     * @param start 起点
     * @param end  终点
     * @return DailyTrainTicket
     */
    DailyTrainTicket selectByUniqueKey(Date date, String trainCode, String start, String end);
}

